<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head lang="en">
    <meta charset="UTF-8">
    <base href="${pageContext.request.contextPath}/">
    <title>超市账单管理系统</title>
    <link rel="stylesheet" href="css/public.css"/>
    <link rel="stylesheet" href="css/style.css"/>
    <script type="text/javascript" src="js/jQuery-1.8.3.js"></script>
    <script type="text/javascript">
    /* 这个是上传图片的预览 */
	$(function(){
			$("#upload").change(
					function(){
						var file=this.files[0];
						var preview=$("#previw").get(0);
						var reader=new FileReader();
						reader.onloadend=function(){
							preview.src=reader.result;
							
						}
						if(file){
							reader.readAsDataURL(file);
							$("#previw").css({"height":"200px","width":"200px"});
						}else{
							preview.src="";
						}}	);

		});
    
    
    </script>
</head>
<body>
<%@include file="top.jsp" %>
<!--主体内容-->
<section class="publicMian ">
    <%@include file="head.jsp" %>
    <div class="right">
        <div class="location">
            <strong>你现在所在的位置是:</strong>
            <span>供应商管理页面 >> 供应商修改页</span>
        </div>
        <div class="providerAdd">
            <form action="provider/providerupdate.csdd?id=${id }" enctype="multipart/form-data" method="post">
                <!--div的class 为error是验证错误，ok是验证成功-->
                <div class="">
                    <label for="providerId">供应商编码：</label>
                    <input type="text" name="proCode" id="providerId" value="${provider.proCode }"/>
                    <span>*</span>
                </div>
                <div>
                    <label for="providerName">供应商名称：</label>
                    <input type="text" name="proName" id="providerName" value="${provider.proName }"/>
                    <span >*</span>
                </div>
                <div>
                    <label for="people">联系人：</label>
                    <input type="text" name="proContact" id="people" value="${provider.proContact }" />
                    <span>*</span>

                </div>
                <div>
                    <label for="phone">联系电话：</label>
                    <input type="text" name="proPhone" id="phone" value="${provider.proPhone }"/>
                    <span></span>
                </div>
                <div>
                    <label for="address">联系地址：</label>
                    <input type="text" name="proAddress" id="address" value="${provider.proAddress }" />
                    <span></span>

                </div>
                <div>
                    <label for="fax">传真：</label>
                    <input type="text" name="proFax" id="fax" value="${provider.proFax }" />
                    <span></span>

                </div>
                <div>
                    <label for="describe">描述：</label>
                    <input type="text" name="proDesc" id="describe" value="${provider.proDesc }" />
                    <span></span>
                </div>
                <div><p>新图：</p>
                 <img src=""  id="previw" />
                <label for="cardpath">供应商证件照</label>
                <input type="file" name="cardpathh"  id="upload" />
                <p>原图：</p>
                <img src="${pageContext.request.contextPath }/images${provider.cardpath }" alt="图片" id="previw" />
                </div>
                <div class="providerAddBtn">
                    <!--<a href="#">保存</a>-->
                    <!--<a href="providerList.html">返回</a>-->
                    <input type="submit" value="保存" />
                    <input type="button" value="返回" onclick="history.back(-1)"/>
                </div>
            </form>
        </div>

    </div>
</section>
<footer class="footer">
    版权归北大青鸟
</footer>
<script src="js/time.js"></script>

</body>
</html>